package com.java.pojo;

/**
 * ComRoleEmpId entity. @author MyEclipse Persistence Tools
 */

public class ComRoleEmpId implements java.io.Serializable {

	// Fields

	private ComEmp comEmp;
	private ComRole comRole;

	// Constructors

	/** default constructor */
	public ComRoleEmpId() {
	}

	/** full constructor */
	public ComRoleEmpId(ComEmp comEmp, ComRole comRole) {
		this.comEmp = comEmp;
		this.comRole = comRole;
	}

	// Property accessors

	public ComEmp getComEmp() {
		return this.comEmp;
	}

	public void setComEmp(ComEmp comEmp) {
		this.comEmp = comEmp;
	}

	public ComRole getComRole() {
		return this.comRole;
	}

	public void setComRole(ComRole comRole) {
		this.comRole = comRole;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof ComRoleEmpId))
			return false;
		ComRoleEmpId castOther = (ComRoleEmpId) other;

		return ((this.getComEmp() == castOther.getComEmp()) || (this
				.getComEmp() != null
				&& castOther.getComEmp() != null && this.getComEmp().equals(
				castOther.getComEmp())))
				&& ((this.getComRole() == castOther.getComRole()) || (this
						.getComRole() != null
						&& castOther.getComRole() != null && this.getComRole()
						.equals(castOther.getComRole())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getComEmp() == null ? 0 : this.getComEmp().hashCode());
		result = 37 * result
				+ (getComRole() == null ? 0 : this.getComRole().hashCode());
		return result;
	}

}